#include <iostream>
#include <cstdio>
#include <vector>

using namespace std; 

#define N	100

int chore_time[N]; 
vector<int> depend[N]; 
int n; 



int main()
{
	int	i, j, tm, pn, p; 
	scanf("%d", &n); 
	for (i=0; i<n; i++) {
		scanf("%d%d", &tm, &pn); 
		chore_time[i] = tm; 
		for (j=0; j<pn; j++) {
			scanf("%d", &p); 
			depend[i].push_back(p); 
		}
	}
	printf("n = %d\n", n); 
	
	for (i=n-1; i>=0; i--) {
		
	}
	
	return 0; 
}



